package com.cv.platform.dal.mapper.report;

import com.cv.framework.common.pojo.PageResult;
import com.cv.framework.mybatis.core.mapper.BaseMapperX;
import com.cv.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.cv.platform.controller.audit.report.vo.AuditReportPageReqVO;
import com.cv.platform.dal.dataobject.report.CvReportDO;
import com.cv.platform.enums.ReportStatusEnum;
import org.apache.ibatis.annotations.Mapper;

/**
 * 举报数据层
 *
 * @author Charles_XDXD
 */
@Mapper
public interface CvReportMapper extends BaseMapperX<CvReportDO> {
    default PageResult<CvReportDO> selectPage(AuditReportPageReqVO reqVO) {
        return selectJoinPage(reqVO, CvReportDO.class, new MPJLambdaWrapperX<CvReportDO>()
                .selectAll(CvReportDO.class)
                .eq(CvReportDO::getStatus, ReportStatusEnum.PENDING.getCode())
        );
    }

}
